package org.ezplatform.office.questionnaire.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.UniqueConstraint;

import org.ezplatform.core.annotation.MetaData;
import org.ezplatform.core.entity.BaseNativeEntity;

/** 
* @author 作者: wujs
* @version 创建时间：2017年11月22日 上午11:37:28 
* 类说明 ：答卷
*/
@MetaData(value = "答卷")
@Entity(name = "QuestionnaireAnswer")
@Table(name = "oa_questionnaire_answer", uniqueConstraints = { @UniqueConstraint(columnNames = "id") })
public class QuestionnaireAnswer extends BaseNativeEntity{

	private static final long serialVersionUID = 4107629619859222935L;
	
	@MetaData(value = "问卷ID")
  	@Column(name = "questionnaire_id", nullable = false, length = 32)
    private String questionnaireId;
	
	@MetaData(value = "用户ID")
  	@Column(name = "user_id", nullable = false, length = 32)
    private String userId;
	
	@MetaData(value = "题目ID")
  	@Column(name = "topic_id", nullable = false, length = 32)
    private String topicId;
	
	@MetaData(value = "选项ID")
  	@Column(name = "option_id", nullable = false, length = 32)
    private String optionId;
	
	@MetaData(value = "分数")
  	@Column(name = "fraction")
    private float fraction;
	
	@MetaData(value = "答案")
  	@Column(name = "answer", length = 100)
    private String answer;
	
	@MetaData(value = "答案附属信息")
  	@Column(name = "answer_ext", length = 100)
    private String answerExt;
	
	@Transient
	private String attachment;
	
	@Transient
	private String urlPic;
	
	public String getAttachment() {
		return attachment;
	}

	public void setAttachment(String attachment) {
		this.attachment = attachment;
	}

	public String getQuestionnaireId() {
		return questionnaireId;
	}

	public void setQuestionnaireId(String questionnaireId) {
		this.questionnaireId = questionnaireId;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getTopicId() {
		return topicId;
	}

	public void setTopicId(String topicId) {
		this.topicId = topicId;
	}

	public String getOptionId() {
		return optionId;
	}

	public void setOptionId(String optionId) {
		this.optionId = optionId;
	}

	public float getFraction() {
		return fraction;
	}

	public void setFraction(float fraction) {
		this.fraction = fraction;
	}

	public String getAnswer() {
		return answer;
	}

	public void setAnswer(String answer) {
		this.answer = answer;
	}

	public String getAnswerExt() {
		return answerExt;
	}

	public void setAnswerExt(String answerExt) {
		this.answerExt = answerExt;
	}

	public String getUrlPic() {
		return urlPic;
	}

	public void setUrlPic(String urlPic) {
		this.urlPic = urlPic;
	}
	

}
